/*
 * Copyright (c) 2006, 2022, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.PrintWriter;

/**
 * <p>Project: javase202202 - Out2
 * <p>Powered by Lisi On 2022-05-31 14:38:10
 * <p>Created by IntelliJ IDEA
 *

 * @version 1.0
 * @since 17
 */
public class Out2 {
    public static void main(String[] args) throws FileNotFoundException {
        String ts = String.format("%tF %<tT %<tA %n",System.currentTimeMillis());
        System.out.println(ts);

        //实例化PrintWriter 类，
        //PrintWriter out = new PrintWriter("d:/user.txt");
        var out = new PrintWriter(new FileOutputStream("d:/user.txt",true));
        out.println(ts);
        for (int i = 0; i < 5; i++) {
            out.printf("%tF 中文效果 %02d %n",System.currentTimeMillis(),i);
        }
        out.close();
    }
}
